Skip to content

chore: remove unused FFI module and C header - #36

Merged
danbugs merged 1 commit into
mainfrom
fix/remove-ffi
May 15, 2026
Merged

chore: remove unused FFI module and C header#36
danbugs merged 1 commit into
mainfrom
fix/remove-ffi

Conversation

@danbugs

@danbugs danbugs commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

The FFI module (ffi.rs) exported C symbols (hl_vm_create, hl_vm_start,
etc.) for embedding from C/Go, but has zero consumers. kraftkit's
plat-hyperlight branch uses hyperlight-unikraft as a CLI binary via
kraftexec.NewProcess, not via FFI. No C code, Go CGo bindings, Python ctypes,
or CI steps reference the shared/static library.

  • Deleted host/src/ffi.rs (393 lines)
  • Deleted host/include/hyperlight_unikraft.h (C header)
  • Removed pub mod ffi; from lib.rs
  • Removed cdylib and staticlib from Cargo.toml crate-type

Test plan

  • cargo check and cargo test pass
  • Confirmed kraftkit plat-hyperlight uses CLI binary, not FFI

Signed-off-by: danbugs <danilochiarlone@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes an unused Rust FFI surface (and associated C header / crate types) for embedding hyperlight-unikraft from non-Rust hosts, keeping the project focused on the CLI/binary usage path.

Changes:

  • Removed the host/src/ffi.rs module and its pub mod ffi; export.
  • Deleted the C header host/include/hyperlight_unikraft.h.
  • Updated host/Cargo.toml to stop producing cdylib/staticlib artifacts.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
host/src/lib.rs Stops exporting the removed ffi module.
host/src/ffi.rs Deletes the unused C-compatible FFI API implementation.
host/include/hyperlight_unikraft.h Deletes the unused public C header for the removed FFI API.
host/Cargo.toml Restricts crate type to Rust lib only (removes cdylib/staticlib).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linux Benchmarks

Details
Benchmark suite Current: 651bcdd Previous: 79b32ae Ratio
hello_world (median) 20 ms 20 ms 1
pandas (median) 100 ms 100 ms 1
density (per VM) 7 MB 7 MB 1
snapshot (disk) 385 MiB 385 MiB 1

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows Benchmarks

Details
Benchmark suite Current: 651bcdd Previous: 79b32ae Ratio
hello_world (median) 179 ms 234 ms 0.76
pandas (median) 528 ms 708 ms 0.75
density (per VM) 6 MB 6 MB 1
snapshot (disk) 393 MiB 393 MiB 1

This comment was automatically generated by workflow using github-action-benchmark.

@danbugs
danbugs merged commit f5eb506 into main May 15, 2026
80 checks passed
@danbugs
danbugs deleted the fix/remove-ffi branch May 15, 2026 06:06
@danbugs danbugs mentioned this pull request May 15, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants